home *** CD-ROM | disk | FTP | other *** search
Wrap
XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) NNNNAAAAMMMMEEEE XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn - The ArrowButton widget class SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS #include <Xm/ArrowB.h> VVVVEEEERRRRSSSSIIIIOOOONNNN This page documents Motif 2.1. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ArrowButton consists of a directional arrow surrounded by a border shadow. When it is selected, the shadow changes to give the appearance that the ArrowButton has been pressed in. When the ArrowButton is unselected, the shadow reverts to give the appearance that the ArrowButton is released, or out. ArrowButton holds the _X_m_Q_T_a_c_t_i_v_a_t_a_b_l_e trait. CCCCllllaaaasssssssseeeessss ArrowButton inherits behavior, resources, and traits from the CCCCoooorrrreeee and XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee classes. The class pointer is _x_m_A_r_r_o_w_B_u_t_t_o_n_W_i_d_g_e_t_C_l_a_s_s. The class name is XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn. NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmmNNNN or XXXXmmmmCCCC prefix and use the remaining letters. To specify one of the defined values for a resource in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXttttGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is not applicable (N/A). XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNactivateCallback XmCCallback XtCallbackList NULL C XmNarmCallback XmCCallback XtCallbackList NULL C XmNarrowDirection XmCArrowDirection unsigned char XmARROW_UP CSG XmNdetailShadowThickness XmCDetailShadowThickness Dimension 2 CSG XmNdisarmCallback XmCCallback XtCallbackList NULL C XmNmultiClick XmCMultiClick unsigned char dynamic CSG Page 1 (printed 10/3/02) XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) XXXXmmmmNNNNaaaaccccttttiiiivvvvaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk Specifies a list of callbacks that is called when the ArrowButton is activated. To activate the button, press and release BBBBSSSSeeeelllleeeeccccttttwhile the pointer is inside the ArrowButton widget. Activating the ArrowButton also disarms it. The reason sent by this callback is XXXXmmmmCCCCRRRR____AAAACCCCTTTTIIIIVVVVAAAATTTTEEEE. This callback uses the _X_m_Q_T_a_c_t_i_v_a_t_a_b_l_e trait. XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk Specifies a list of callbacks that is called when the ArrowButton is armed. To arm this widget, press BBBBSSSSeeeelllleeeeccccttttwhile the pointer is inside the ArrowButton. The reason sent by this callback is XXXXmmmmCCCCRRRR____AAAARRRRMMMM. XXXXmmmmNNNNaaaarrrrrrrroooowwwwDDDDiiiirrrreeeeccccttttiiiioooonnnn Sets the arrow direction. The values for this resource are +o XXXXmmmmAAAARRRRRRRROOOOWWWW____UUUUPPPP +o XXXXmmmmAAAARRRRRRRROOOOWWWW____DDDDOOOOWWWWNNNN +o XXXXmmmmAAAARRRRRRRROOOOWWWW____LLLLEEEEFFFFTTTT +o XXXXmmmmAAAARRRRRRRROOOOWWWW____RRRRIIIIGGGGHHHHTTTT XXXXmmmmNNNNddddeeeettttaaaaiiiillllSSSShhhhaaaaddddoooowwwwTTTThhhhiiiicccckkkknnnneeeessssssss Specifies the thickness of the inside arrow shadows. The default thickness is 2 pixels. XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk Specifies a list of callbacks that is called when the ArrowButton is disarmed. To disarm this widget, press and release BBBBSSSSeeeelllleeeecccctttt while the pointer is inside the ArrowButton. The reason for this callback is XXXXmmmmCCCCRRRR____DDDDIIIISSSSAAAARRRRMMMM. XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkk If a button click is followed by another button click within the time span specified by the display's multiclick time, and this resource is set to XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____DDDDIIIISSSSCCCCAAAARRRRDDDD, the second click. is not processed. If this resource is set to XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____KKKKEEEEEEEEPPPP, the event is processed and _c_l_i_c_k__c_o_u_n_t is incremented in the callback structure. When the button is not in a menu, the default value is XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____KKKKEEEEEEEEPPPP. IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss ArrowButton inherits behavior and resources from the Page 2 (printed 10/3/02) XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) superclasses described in the following table. For a complete description of each resource, refer to the reference page for that superclass. XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNconvertCallback XmCCallback XtCallbackList NULL C XmNforeground XmCForeground Pixel dynamic CSG XmNhelpCallback XmCCallback XtCallbackList NULL C XmNhighlightColor XmCHighlightColor Pixel dynamic CSG XmNhighlightOnEnter XmCHighlightOnEnter Boolean False CSG XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG XmNhighlightThickness XmCHighlightThickness Dimension 2 CSG XmNlayoutDirection XmCLayoutDirection XmDirection dynamic CG XmNnavigationType XmCNavigationType XmNavigationType XmNONE CSG XmNpopupHandlerCallback XmCCallback XtCallbackList NULL C XmNshadowThickness XmCShadowThickness Dimension 2 CSG XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG XmNtraversalOn XmCTraversalOn Boolean True CSG XmNunitType XmCUnitType unsigned char dynamic CSG XmNuserData XmCUserData XtPointer NULL CSG CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG XmNancestorSensitive XmCSensitive Boolean dynamic G XmNbackground XmCBackground Pixel dynamic CSG XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNborderWidth XmCBorderWidth Dimension 0 CSG XmNcolormap XmCColormap Colormap dynamic CG XmNdepth XmCDepth int dynamic CG XmNdestroyCallback XmCCallback XtCallbackList NULL C XmNheight XmCHeight Dimension dynamic CSG XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG XmNscreen XmCScreen Screen * dynamic CG XmNsensitive XmCSensitive Boolean True CSG XmNtranslations XmCTranslations XtTranslations dynamic CSG XmNwidth XmCWidth Dimension dynamic CSG XmNx XmCPosition Position 0 CSG XmNy XmCPosition Position 0 CSG CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn A pointer to the following structure is passed to each callback: typedef struct Page 3 (printed 10/3/02) XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) { int _r_e_a_s_o_n; XEvent * _e_v_e_n_t; int _c_l_i_c_k__c_o_u_n_t; } XmArrowButtonCallbackStruct; _r_e_a_s_o_n Indicates why the callback was invoked. _e_v_e_n_t Points to the _X_E_v_e_n_t that triggered the callback. _c_l_i_c_k__c_o_u_n_t This value is valid only when the reason is XXXXmmmmCCCCRRRR____AAAACCCCTTTTIIIIVVVVAAAATTTTEEEE. It contains the number of clicks in the last multiclick sequence if the XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkk resource is set to XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____KKKKEEEEEEEEPPPP; otherwise it contains 1. The activate callback is invoked for each click if XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkkis set to XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____KKKKEEEEEEEEPPPP. TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss XmArrowButton includes translations for XmPrimitive. The following key names are listed in the X standard key event translation table syntax. This format is the one used by Motif to specify the widget actions corresponding to a given key. A brief overview of the format is provided under VVVViiiirrrrttttuuuuaaaallllBBBBiiiinnnnddddiiiinnnnggggssss(3). For a complete description of the format, please refer to the X Toolkit Instrinsics Documentation. <<<<EEEEnnnntttteeeerrrrWWWWiiiinnnnddddoooowwww>>>>: Enter() <<<<LLLLeeeeaaaavvvveeeeWWWWiiiinnnnddddoooowwww>>>>: Leave() cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>: ButtonTakeFocus() ~~~~cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>: Arm() ~~~~cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>,,,,~~~~cccc<<<<BBBBttttnnnn1111UUUUpppp>>>>: Activate() Disarm() ~~~~cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>((((2222++++)))): MultiArm() ~~~~cccc<<<<BBBBttttnnnn1111UUUUpppp>>>>((((2222++++)))): MultiActivate() ~~~~cccc<<<<BBBBttttnnnn1111UUUUpppp>>>>: Activate() Disarm() Page 4 (printed 10/3/02) XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffAAAAccccttttiiiivvvvaaaatttteeee>>>>: PrimitiveParentActivate() ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffCCCCaaaannnncccceeeellll>>>>: PrimitiveParentCancel() ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffSSSSeeeelllleeeecccctttt>>>>: ArmAndActivate() ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffHHHHeeeellllpppp>>>>: Help() ~~~~ssss ~~~~mmmm ~~~~aaaa <<<<KKKKeeeeyyyy>>>>RRRReeeettttuuuurrrrnnnn: PrimitiveParentActivate() ~~~~ssss ~~~~mmmm ~~~~aaaa <<<<KKKKeeeeyyyy>>>>ssssppppaaaacccceeee: ArmAndActivate() AAAAccccttttiiiioooonnnn RRRRoooouuuuttttiiiinnnneeeessss The XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn action routines are Activate(): Draws the shadow in the unselected state. If the pointer is within the ArrowButton, calls the callbacks for XXXXmmmmNNNNaaaaccccttttiiiivvvvaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk. Arm(): Draws the shadow in the selected state and calls the callbacks for XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk. ArmAndActivate(): Draws the shadow in the selected state and calls the callbacks for XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk. Arranges for the shadow to be drawn in the unselected state and the callbacks for XXXXmmmmNNNNaaaaccccttttiiiivvvvaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk and XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkkto be called, either immediately or at a later time. ButtonTakeFocus(): Causes the ArrowButton to take keyboard focus when CCCCttttrrrrllll<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>> is pressed, without activating the widget. Disarm(): Draws the shadow in the unselected state and calls the callbacks for XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk. Help(): Calls the callbacks for XXXXmmmmNNNNhhhheeeellllppppCCCCaaaallllllllbbbbaaaacccckkkk if any exist. If there are no help callbacks for this widget, this action calls the help callbacks for the nearest ancestor that has them. MultiActivate(): If XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkk is XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____DDDDIIIISSSSCCCCAAAARRRRDDDD, this Page 5 (printed 10/3/02) XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn((((3333XXXX)))) action does nothing. If XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkk is XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____KKKKEEEEEEEEPPPP, this action increments _c_l_i_c_k__c_o_u_n_t in the callback structure and draws the shadow in the unselected state. If the pointer is within the ArrowButton, this action calls the callbacks for XXXXmmmmNNNNaaaaccccttttiiiivvvvaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk and XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk. MultiArm(): If XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkk is XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____DDDDIIIISSSSCCCCAAAARRRRDDDD, this action does nothing. If XXXXmmmmNNNNmmmmuuuullllttttiiiiCCCClllliiiicccckkkk is XXXXmmmmMMMMUUUULLLLTTTTIIIICCCCLLLLIIIICCCCKKKK____KKKKEEEEEEEEPPPP, this action draws the shadow in the selected state and calls the callbacks for XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk. AAAAddddddddiiiittttiiiioooonnnnaaaallll BBBBeeeehhhhaaaavvvviiiioooorrrr This widget has the following additional behavior: <<<<EEEEnnnntttteeeerrrrWWWWiiiinnnnddddoooowwww>>>>: Draws the ArrowButton shadow in its selected state if the pointer leaves and re-enters the window while <<<<BBBBttttnnnn1111>>>> is pressed. <<<<LLLLeeeeaaaavvvveeeeWWWWiiiinnnnddddoooowwww>>>>: Draws the ArrowButton shadow in its unselected state if the pointer leaves the window while <<<<BBBBttttnnnn1111>>>> is pressed. VVVViiiirrrrttttuuuuaaaallll BBBBiiiinnnnddddiiiinnnnggggssss The bindings for virtual keys are vendor specific. For information about bindings for virtual buttons and keys, see VVVViiiirrrrttttuuuuaaaallllBBBBiiiinnnnddddiiiinnnnggggssss(3). RRRREEEELLLLAAAATTTTEEEEDDDD CCCCoooorrrreeee(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeeAAAArrrrrrrroooowwwwBBBBuuuuttttttttoooonnnn(3), and XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee(3). Page 6 (printed 10/3/02)